<style>
    .ui-grid-cell {
        height: auto!important;
    }
    
    .ui-grid-header {
        height: 39px!important;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    
    .ui-grid-header-cell-label {
        height: 39px!important;
        white-space: normal;
        text-overflow: ellipsis;
        overflow: hidden;
        display: block;
    }
</style>
<div class="bg-light lter b-b wrapper-sm">
    <h1 class="m-n font-thin h4">报表导出</h1>
</div>
<div class="wrapper-sm" ng-controller="ExportController">
    <div class="panel panel-default">
        <div class="panel-heading font-bold">查询</div>
        <div class="panel-body">

            <label class="control-label pull-left m-t-xs w-xs">合同号</label>

            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm" id="contractNum" ng-model="queryTerms.contractNum" placeholder="请输入合同号" name="contractNum">
            </div>

            <label class="control-label pull-left m-t-xs w-xs">客户单位</label>
            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm" id="clientName" ng-model="queryTerms.clientName" placeholder="请输入客户单位" name="clientName">
            </div>
            <label class="control-label pull-left m-t-xs w-xs">发货地址</label>
            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm" id="shipAddress" ng-model="queryTerms.shipAddress" placeholder="请输入发货地址" name="beginaddress">
            </div>

            <label class="control-label pull-left m-t-xs w-xs">送货地址</label>
            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm" id="deliverAddress" ng-model="queryTerms.deliverAddress" placeholder="请输入送货地址" name="endaddress">
            </div>

            <div class="line line-xs pull-in"></div>

            <label class="control-label pull-left m-t-xs w-xs">发货起始时间</label>

            <div class="col-md-2 col-xs-12 form-group">
                <div class="input-group input-group-sm date">
                    <input id="dataTime" datetimepicker plugintype="datetime" ng-model="queryTerms.shipStartTime" name="ship-start-time" placeholder="起始时间" class="form-control" type="text" />
                    <span id="opendataTime" class="input-group-addon curpoint">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>

            <label class="control-label pull-left m-t-xs w-xs">发货结束时间</label>
            <div class="col-md-2 col-xs-12 form-group">
                <div class="input-group input-group-sm date">
                    <input id="dataTimeEnd" datetimepicker plugintype="datetime" ng-model="queryTerms.shipEndTime" name="ship-end-time" placeholder="结束时间" class="form-control" type="text" />
                    <span id="opendataTimeEnd" class="input-group-addon curpoint">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
            <label class="control-label pull-left m-t-xs w-xs">承运商</label>
            <div class="col-md-2">
                <input type="text" class="form-control input-sm" id="fa-searchz-carrier-name" ng-model="queryTerms.carrierName" placeholder="请输入承运商" name="carrierName">
            </div>
            <label class="control-label pull-left m-t-xs w-xs">驾驶员</label>
            <div class="col-md-2">
                <input type="text" class="form-control input-sm" id="fa-searchz-driver" ng-model="queryTerms.driver" placeholder="请输入驾驶员" name="driver">
            </div>
            <div class="line line-xs pull-in"></div>
            <label class="control-label pull-left w-xs"></label>
            <div class="col-md-2 col-xs-12"></div>
            <label class="control-label pull-left w-xs"></label>
            <div class="col-md-2 col-xs-12"></div>
            <label class="control-label pull-left w-xs"></label>
            <div class="col-md-2 col-xs-12"></div>
            <label class="control-label pull-left w-xs"></label>
            <div class="col-md-2 col-xs-12">
                <button ng-click="queryFunc()" class="btn btn-sm btn-default btn-addon" ng-class="{'disabled':querying}" ng-disabled="querying">
                    <i class="fa fa-search" ng-show="!querying"></i>
                    <i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
                    <span ng-show="!querying">查询</span>
                    <span ng-show="querying">查询中...</span>
                </button>
            </div>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading">
            报表列表
        </div>
        <div class="table-responsive">
            <div ui-grid="gridOptions" id="excel_export_gridOptions" ui-grid-pagination ui-grid-auto-resize ui-grid-resize-columns style="height:{{heightA}}px; min-width:1000px; min-height:395px;overflow:hidden;">
                <div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
            </div>

        </div>
        <div class="panel-body">
            <button ng-click="exportFunc(false)" class="pull-right-xs btn m-b-xs btn-sm btn-success btn-addon "><i class="fa fa-download"></i>导出报表</button>
            <button ng-click="exportFunc(true)" class="pull-right-xs btn m-b-xs btn-sm btn-success btn-addon "><i class="fa fa-download"></i>导出报表2</button>
        </div>
    </div>
</div>